/*
 Navicat Premium Data Transfer

 Source Server         : 公司阿里云
 Source Server Type    : SQL Server
 Source Server Version : 13005026
 Source Host           : 121.40.101.29:1433
 Source Catalog        : scm_main_sfl_visit_dev
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 13005026
 File Encoding         : 65001

 Date: 18/12/2020 16:24:27
*/


-- ----------------------------
-- Table structure for bd_sys_user_role
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bd_sys_user_role]') AND type IN ('U'))
	DROP TABLE [dbo].[bd_sys_user_role]
GO

CREATE TABLE [dbo].[bd_sys_user_role] (
  [user_id] int  NOT NULL,
  [role_id] int  NOT NULL
)
GO

ALTER TABLE [dbo].[bd_sys_user_role] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id bd_sys_login_user',
'SCHEMA', N'dbo',
'TABLE', N'bd_sys_user_role',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'角色id bd_sys_role',
'SCHEMA', N'dbo',
'TABLE', N'bd_sys_user_role',
'COLUMN', N'role_id'
GO


-- ----------------------------
-- Primary Key structure for table bd_sys_user_role
-- ----------------------------
ALTER TABLE [dbo].[bd_sys_user_role] ADD CONSTRAINT [PK__bd_sys_u__6EDEA153FBD6481C] PRIMARY KEY CLUSTERED ([user_id], [role_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

